Skip to content

SYCL: Add all missing unary kernels #13074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025
Merged

SYCL: Add all missing unary kernels #13074

merged 4 commits into from
Apr 28, 2025

Conversation

qnixsynapse
Copy link
Collaborator

@qnixsynapse qnixsynapse commented Apr 23, 2025

Added missing absolute, ELU and SGN kernels.

test-backend-ops is passing with this change.

Note: Instead of doing item_ct1.get_local_range(2) * item_ct1.get_group(2) + item_ct1.get_local_id(2); as with how it has been for rest of it, I did item_ct1.get_global_id(2) for getting the idx position of an element here since operation of each element is independent of each other. Will be happy to hear thoughts about this.

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Apr 23, 2025
@qnixsynapse qnixsynapse force-pushed the sycl/unary_all branch 3 times, most recently from dd0b15f to beed9b3 Compare April 25, 2025 01:47
@NeoZhangJianyu
Copy link
Collaborator

Added missing absolute, ELU and SGN kernels.

test-backend-ops is passing with this change.

Note: Instead of doing item_ct1.get_local_range(2) * item_ct1.get_group(2) + item_ct1.get_local_id(2); as with how it has been for rest of it, I did item_ct1.get_global_id(2) for getting the idx position of an element here since operation of each element is independent of each other. Will be happy to hear thoughts about this.

Both methods are same for some cases.
The first method is used popular in SYCL is due to the code is migrated from CUDA, which comes the original authors.

Copy link
Collaborator

@NeoZhangJianyu NeoZhangJianyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job to support more OPs!

Thank you!

@Rbiessy Rbiessy merged commit a4c340f into master Apr 28, 2025
48 checks passed
@Rbiessy Rbiessy deleted the sycl/unary_all branch April 28, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants